package com.spring.cloudclientconsumer.controller

import org.springframework.beans.factory.annotation.Autowired
import org.springframework.cloud.client.loadbalancer.LoadBalanced
import org.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import org.springframework.web.client.RestTemplate

@RestController
class MyController {

    @Autowired
    @LoadBalanced
    RestTemplate rest


    @RequestMapping('get')
    String get(){

        rest.getForObject('http://provider/get',String.class)

    }

}
